<?php
/*
 +----------------------------------------------------------------------
 + Title        : Map 控制器
 + Author       : Randy_chen
 + Version      : V1.0.0.1
 + Initial-Time : 2020/4/27 10:20
 + Last-time    : 2020/4/27 10:20+ 86187
 + Desc         : Map
 +----------------------------------------------------------------------
*/
namespace txmap;

/**
 * 腾讯地图SDK
 * Class Map
 *
 * @package txmap
 */
class Map {
    protected $key = 'W2SBZ-PNARK-BRYJF-ALGXU-GRGI5-6WBFU';
    protected $baseUrl = 'http://apis.map.qq.com/ws/geocoder/v1/?';
    public function getAddress($j , $w){
        $data['location'] = "{$w},{$j}";
        $data['key'] = $this->key;
        $data['get_poi'] = 0;
        $res = http_get($this->baseUrl , $data);
        return $res;
    }

}